-- DungeonSkyBossM
-- Create by dengc
-- 地牢天空战boss模块

module("DungeonSkyBossM", package.seeall);

-- 配置信息
local bossTable = {};

-- 载入配置表
local _init = false;
local loadCsv = function()
    if _init then return end
    _init = true;

    -- 转换下表
    local dungeon_sc_boss_CSV = get_dungeon_sc_boss_CSV();
    for i = 1, #dungeon_sc_boss_CSV do
        bossTable[dungeon_sc_boss_CSV[i].class_id] = dungeon_sc_boss_CSV[i];
    end

    dungeon_sc_boss_CSV = {};
end

-- 模块初始化
function init()
    loadCsv();
end

-- 检索信息
function query(id, path)
    local m = bossTable[id]

    if not m or path == "" or not path then
        return m
    end

    return m[path]
end
